package com.briup.app02.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.briup.app02.bean.AccountApply;
import com.briup.app02.bean.AccountApplyExample;
import com.briup.app02.dao.AccountApplyMapper;
import com.briup.app02.service.IAccountApplyService;

@Service
public class AccountApplyServiceImpl implements IAccountApplyService {
		@Autowired
		private AccountApplyMapper accountapplyMapper;
		
		@Override
		public List<AccountApply> findAll() {
			AccountApplyExample example = new AccountApplyExample();
			return accountapplyMapper.selectByExample(example);
		}
		
		@Override
		public void saveOrUpdate(AccountApply accountapply ) {
			if(accountapply.getId() == null) {
				accountapplyMapper.insert(accountapply);
			} else {
				accountapplyMapper.updateByPrimaryKey(accountapply);
			}
		}
		
		@Override
		public AccountApply findById(long id) {
			return accountapplyMapper.selectByPrimaryKey(id);
		}
		
		@Override
		public void deleteById(long id) {
			accountapplyMapper.deleteByPrimaryKey(id);
		}

		@Override
		public void changeStatus(Long id, String status, String reason) {
			// TODO Auto-generated method stub
			
		}

}

